package com.hainingtong.main.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.util.AntPathMatcher;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 注意 网上这样的配置有bug，会导致swagger3地址访问不了，原因不明
 * //public class WebConfig extends WebMvcConfigurationSupport {
 */
@Configuration
public class WebConfig implements WebMvcConfigurer{
    @Override
    public void configurePathMatch(PathMatchConfigurer configurer) {
        AntPathMatcher matcher = new AntPathMatcher();
        matcher.setCaseSensitive(false); // 让url不区分大小写
        configurer.setPathMatcher(matcher);
    }
}
